var ROOT='http://www.youyiku-yishu.cn';
function t1(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content1">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe1">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img1" onclick="renewal(1,1)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang1"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.45, 0.45, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.45, 0.45, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }

                }
            }
        }        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In1">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,1)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入120个字" maxlength="120" value=""  class="input input1"/>';
        page += '</div>';
        page += '<div class="Input1">';
        page += '<div class="text text1" onclick="Version(1,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }else{
                page+=text;
            }

        }
        else{
            page+="最多输入120个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t2(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content2">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe2">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img2" onclick="renewal(1,2)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang2"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        else{
            page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/white.jpg"" class="mw" id=""/>';
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe3">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img3" onclick="renewal(2,3)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang3"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.55, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In2">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,2)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input2"/>';
        page += '</div>';
        page += '<div class="Input2">';
        page += '<div class="text text2" onclick="Version(2,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }else{
                page+=text;
            }

        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t3(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content3">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe4">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img4" onclick="renewal(1,4)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                           page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang4"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.30, 0.30, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.30, 0.30, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe5">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img5" onclick="renewal(2,5)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang5"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
       
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe6">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img6" onclick="renewal(3,6)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==3){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang6"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.40, 0.40, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.40, 0.40, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
       
        page += '<div class="upload-div"></div>'
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In3">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,3)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入43个字" maxlength="43" value=""  class="input input3"/>';
        page += '</div>';
        page += '<div class="Input3">';
        page += '<div class="text text3" onclick="Version(3,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }else{
                page+=text;
            }

        }
        else{
            page+="最多输入43个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t4(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content4">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe7">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img7" onclick="renewal(1,7)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang7"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe8">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img8" onclick="renewal(2,8)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang8"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe9">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img9" onclick="renewal(3,9)">';
	    if(img){
	            if(img.length>0){
	                for (var i=0;i<img.length;i++){
	                    if(img[i].direction==3){
	                        if(img[i].genre==1){
	                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
	                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang9"/>';
	                        page+='</div>';
	                        }else{
                                var imgage1=img[i].img;
                                var flg='_thumb';
                                var img1=insert_flg(imgage1,flg,37);

                                var isedit=img[i].isedit;
                                isedit=Number(isedit);
                                if(img[i].transform!=null){
                                    if(isedit==0){
//                                      page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
										  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                    }else{
                                        page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                    }

                                }else{
                                    if(isedit==0){
//                                      page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                    }else{
                                        page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                    }

                                }
                            }
	                    }
	                }
	            }
	        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe10">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img10" onclick="renewal(4,10)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==4){
                        if(img[i].genre==1){
                              page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                              page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang10"/>';
                              page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
       
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In4">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,4)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入43个字" maxlength="43" value=""  class="input input4"/>';
        page += '</div>';
        page += '<div class="Input4">';
        page += '<div class="text text4" onclick="Version(4,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }
            else{
                page+=text;
            }
        }
        else{
            page+="";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t5(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content5">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe11">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img11" onclick="renewal(1,11)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang11"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.23, 0.23, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.23, 0.23, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe12">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img12" onclick="renewal(2,12)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                             page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang12"/>';
                       		 page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.30, 0.30, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px,  px) scale3d(0.30, 0.30, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe13">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img13" onclick="renewal(3,13)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==3){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang13"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In_5">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,5)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入77个字" maxlength="77" value=""  class="input input5"/>'
        page += '</div>';
        page += '<div class="Input5">';
        page += '<div class="text text5" onclick="Version(5,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }
            else{
                page+=text;
            }
        }
        else{
            page+="最多输入77个字";
        }
        page += '</div>';
        page += '</div>';
        page += '<div class="In In_8">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(2,8)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入80个字" maxlength="80" value=""  class="input input8"/>'
        page += '</div>';
        page += '<div class="Input5">';
        page += '<div class="text text8 text_2" onclick="Version(8,2)">';
        if(text1){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text1+'"></div>'
            }
            else{
                page+=text1;
            }
        }
        else{
            page+="最多输入80个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t6(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content6">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe16">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img16" onclick="renewal(1,16)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang16"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.47, 0.47, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.47, 0.47, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In6">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,6)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入88个字" maxlength="88" value=""  class="input input6"/>';
        page += '</div>';
        page += '<div class="Input6">';
        page += '<div class="text text6" onclick="Version(6,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入88个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t7(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content7">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe17">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img17" onclick="renewal(1,17)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang17"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
							  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe18">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img18" onclick="renewal(2,18)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==2){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang18"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In6">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,9)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入60个字" maxlength="60" value=""  class="input input9"/>';
        page += '</div>';
        page += '<div class="Input9">';
        page += '<div class="text text9" onclick="Version(9,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入60个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t8(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content8">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe19">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img19" onclick="renewal(1,19)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang19"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe20">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img20" onclick="renewal(2,20)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==2){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang20"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
							  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe21">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img21" onclick="renewal(3,21)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==3){
                    if(img[i].genre==1){
                       page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang21"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.3, 0.3, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe22">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img22" onclick="renewal(4,22)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==4){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang22"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In7">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,7)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入27个字" maxlength="27" value=""  class="input input7"/>';
        page += '</div>';
        page += '<div class="Input7">';
        page += '<div class="text text7" onclick="Version(7,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入37个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t9(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content9">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe27">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img27" onclick="renewal(1,27)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang27"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
							  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.45, 0.45, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.45, 0.45, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe23">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img23" onclick="renewal(2,23)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==2){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang23"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.28, 0.28, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.28, 0.28, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe24">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img24"onclick="renewal(3,24)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==3){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang24"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
							  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.35, 0.35, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe25">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img25" onclick="renewal(5,25)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==4){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang25"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
 								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
 	                           }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
 								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.25, 0.25, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
      	page += '<div class="In">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,10)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入80个字" maxlength="80" value=""  class="input input10"/>';
        page += '</div>';
        page += '<div class="Input10">';
        page += '<div class="text text10" onclick="Version(10,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入80个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t10(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content10">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe28">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img28" onclick="renewal(1,28)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang28"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.38, 0.38, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.38, 0.38, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe29">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img29" onclick="renewal(2,29)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang29"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.38, 0.38, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.38, 0.38, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In In_11">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,11)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input11"/>';
        page += '</div>';
        page += '<div class="Input11">';
        page += '<div class="text text11" onclick="Version(11,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }else{
                page+=text;
            }

        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
         page += '<div class="In In_12">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(2,12)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input12"/>';
        page += '</div>';
        page += '<div class="Input12">';
        page += '<div class="text text12" onclick="Version(12,2)">';
        if(text1){
            if(text1.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text1+'"></div>'
            }else{
                page+=text1;
            }

        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
//       page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/b1-1.png" alt="" class="photoframe2-img"/>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t11(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content11">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe30">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img30" onclick="renewal(1,30)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang30"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.33, 0.33, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.33, 0.33, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe31">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img31" onclick="renewal(2,31)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==2){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang31"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe32">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img32" onclick="renewal(3,32)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==3){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang32"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe33">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img33" onclick="renewal(4,33)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==4){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang33"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.21, 0.21, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.21, 0.21, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
      	page += '<div class="In In_13">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,13)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入60个字" maxlength="60" value=""  class="input input13"/>';
        page += '</div>';
        page += '<div class="Input13">';
        page += '<div class="text text13" onclick="Version(13,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入60个字";
        }
        page += '</div>';
        page += '</div>';
        page += '<div class="In In_14">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(2,14)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input14"/>';
        page += '</div>';
        page += '<div class="Input14">';
        page += '<div class="text text14" onclick="Version(14,2)">';
        if(text1){
            if(text1.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text1+'"></div>';
            }else{
                page+=text1;
            }
        }
        else{
            page+="最多输入10个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t12(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content12">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe34">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img34" onclick="renewal(1,34)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang34"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.33, 0.33, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.33, 0.33, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe35">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img35" onclick="renewal(2,35)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang35"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.37, 0.37, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.37, 0.37, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe36">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img36" onclick="renewal(3,36)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==3){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang36"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.28, 0.28, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.28, 0.28, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,15)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入70个字" maxlength="70" value=""  class="input input15"/>'
        page += '</div>';
        page += '<div class="Input15">';
        page += '<div class="text text15" onclick="Version(15,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }
            else{
                page+=text;
            }
        }
        else{
            page+="最多输入70个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t13(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content13">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe37">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img37" onclick="renewal(1,37)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==1){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang37"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe38">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img38"  onclick="renewal(2,38)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==2){
                        if(img[i].genre==1){
                             page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang38"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe39">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img39" onclick="renewal(3,39)">';
        if(img){
            if(img.length>0){
                for (var i=0;i<img.length;i++){
                    if(img[i].direction==3){
                        if(img[i].genre==1){
                            page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang39"/>';
                        page+='</div>';
                        }else{
                            var imgage1=img[i].img;
                            var flg='_thumb';
                            var img1=insert_flg(imgage1,flg,37);

                            var isedit=img[i].isedit;
                            isedit=Number(isedit);
                            if(img[i].transform!=null){
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
									  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }else{
                                if(isedit==0){
//                                  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.31, 0.31, 1);"/>';
                                }else{
                                    page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                                }

                            }
                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="In">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,16)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input16"/>'
        page += '</div>';
        page += '<div class="Input16">';
        page += '<div class="text text16" onclick="Version(16,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>'
            }
            else{
                page+=text;
            }
        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
function t14(inpage){
    var pbId=Cookies.get('pbId');
        $.ajax({
		    type:"POST",
		    url:"http://www.youyiku-yishu.cn/WebApp/AppPhotoBooks/editPage",
		    data:{pbId:1787,page:inpage},
		    dataType:"json",
		       beforeSend: function (XMLHttpRequest) {
		         		XMLHttpRequest.setRequestHeader("DEVICEINFO", "JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU");
		       }
		  }).then(json=>{
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
        $('.Conter').html('');
        var page = "";
        page += '<div class="content14">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe40">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img40" onclick="renewal(1,40)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang40"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.22, 0.22, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe41">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img41" onclick="renewal(2,41)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==2){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang41"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								  page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe42">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img42" onclick="renewal(3,42)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==3){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang42"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
        page += '<div class="photoframe photoframe43">';
        page += '<div class="album-old">';
        page += '<div class="upload-img img43" onclick="renewal(4,43)">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==4){
                    if(img[i].genre==1){
                        page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang43"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.2, 0.2, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
      	page += '<div class="In In_17">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,17)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input17"/>';
        page += '</div>';
        page += '<div class="Input17">';
        page += '<div class="text text17" onclick="Version(17,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
        page += '<div class="In In_18">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(2,18)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入100个字" maxlength="100" value=""  class="input input18"/>';
        page += '</div>';
        page += '<div class="Input18">';
        page += '<div class="text text18" onclick="Version(18,2)">';
        if(text1){
            if(text1.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text1+'"></div>';
            }else{
                page+=text1;
            }
        }
        else{
            page+="最多输入100个字";
        }
        page += '</div>';
        page += '</div>';
        page += '</div>';
        $('.Conter').html(page);
        tobecode();
        toBecomeCode();
    })
}
//插页模板
function Cha_1(){
		$('.Conter').html('');
        var page = "";
        page += '<div class="iset1">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
		page += '</div>';      
        $('.Conter').html(page);
}
function Cha_2(){
		$('.Conter').html('');
        var page = "";
        page += '<div class="iset2">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
		page += '</div>';      
        $('.Conter').html(page);
}
function Cha_3(){
		$('.Conter').html('');
        var page = "";
        page += '<div class="iset3">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
		page += '</div>';      
        $('.Conter').html(page);
}
function Cha_4(inpage){
	$.post(U('WebApp/PhotoBooks/editPage'),{page:inpage,pbId:pbId},function(json) {
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
		$('.Conter').html('');
		$('.Conter').html('');
        var page = "";
        page += '<div class="iset4">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
         page += '<div class="In">';
        page += '<div class="qu" onclick="qu()">';
        page += '取消';
        page += '</div>';
        page += '<div class="wan" onclick="Text(1,19)">';
        page += '完成';
        page += '</div>';
        page += '<input type="text" placeholder="最多输入330个字" maxlength="330" value=""  class="input input19"/>';
        page += '</div>';
        page += '<div class="Input19">';
        page += '<div class="text text19" onclick="Version(19,1)">';
        if(text){
            if(text.toString().indexOf('pload')>0){
                page+='<div class="erWeiMa" data-url="'+text+'"></div>';
            }else{
                page+=text;
            }
        }
        else{
            page+="最多输入330个字";
        }
        page += '</div>';
        page += '</div>';
		page += '</div>';      
        $('.Conter').html(page);
     })
}
function Cha_5(inpage){
	$.post(U('WebApp/PhotoBooks/editPage'),{page:inpage,pbId:pbId},function(json) {
        var img = json.photo;
        var text = json.text;
        var text1 = json.text1;
		$('.Conter').html('');
        var page = "";
        page += '<div class="iset5">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/delete1.png"/ class="delete" onclick="deletePage()">';
        page += '<div class="photoframe photoframe44">';
        page += '<div class="album-old">';
         page += '<div class="renewal r44" onclick="renewal(1,44)">';
        page += '<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/huantu.png"/>';
        page += '<br /><a>上传图片和视频</a>';
        page += '</div>';
        page += '<div class="upload-img img44">';
        if(img){
            for (var i=0;i<img.length;i++){
                if(img[i].direction==1){
                    if(img[i].genre==1){
                         page+='<div class="vedioToCode" data-url="'+img[i].img+'">';
                        page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/bofang.png" class="bofang44"/>';
                        page+='</div>';
                    }else{
                        var imgage1=img[i].img;
                        var flg='_thumb';
                        var img1=insert_flg(imgage1,flg,37);

                        var isedit=img[i].isedit;
                        isedit=Number(isedit);
                        if(img[i].transform!=null){
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+'  targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.65,0.65, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }else{
                            if(isedit==0){
//                              page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="mw'+img[i].shape+' targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
								 page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class="targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d(0px,0px, 0px) scale3d(0.65, 0.65, 1);"/>';
                            }else{
                                page+='<img src="'+ROOT+'/'+img1+'" onclick="photoedit('+img[i].direction+')"class=" targetObj_'+img[i].direction+' " id="" style="position: relative; transform-origin: 0px 0px 0px; left: 0px; transition: all 0.5s ease-out; cursor: move; visibility: visible; transform: translate3d('+img[i].zuo+'px,'+img[i].top+'px, 0px) scale3d('+img[i].ratio+', '+img[i].ratio+', 1);"/>';
                            }

                        }
                    }
                }
            }
        }
        page += '<div class="upload-div"></div>';
        page += '</div>';
        page += '</div>';
        page += '</div>';
		page += '</div>';      
        $('.Conter').html(page);
         tobecode();
        toBecomeCode();
    })
}
//模板
function moban(){
    $('.MB').html('');
    var page = "";
    var style = $('#style').val();
    page+='<div class="m1">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m1.jpg" class="MB-img" onclick="mb(1,this)"/>';
    page+='</div>';
    page+='<div class="m2">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m2.jpg" class="MB-img" onclick="mb(2,this)"/>';
    page+='</div>';
    page+='<div class="m3">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m3.jpg" class="MB-img" onclick="mb(3,this)"/>';
    page+='</div>';
    page+='<div class="m4">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m4.jpg" class="MB-img" onclick="mb(4,this)"/>';
    page+='</div>';
    page+='<div class="m5">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m5.jpg" class="MB-img" onclick="mb(5,this)"/>';
    page+='</div>';
    page+='<div class="m6">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m6.jpg" class="MB-img" onclick="mb(6,this)"/>';
    page+='</div>';
    page+='<div class="m7">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m7.jpg"class="MB-img"/ onclick="mb(7,this)">';
    page+='</div>';
    page+='<div class="m8">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m8.jpg"class="MB-img"/ onclick="mb(8,this)">';
    page+='</div>';
    page+='<div class="m9">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m9.jpg"class="MB-img"/ onclick="mb(9,this)">';
    page+='</div>';
    page+='<div class="m10">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m10.jpg"class="MB-img"/ onclick="mb(10,this)">';
    page+='</div>';
    page+='<div class="m11">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m11.jpg"class="MB-img"/ onclick="mb(11,this)">';
    page+='</div>';
    page+='<div class="m12">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m12.jpg"class="MB-img"/ onclick="mb(12,this)">';
    page+='</div>';
    page+='<div class="m13">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m13.jpg"class="MB-img"/ onclick="mb(13,this)">';
    page+='</div>';
    page+='<div class="m14">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m14.jpg"class="MB-img"/ onclick="mb(14,this)">';
    page+='</div>';
    $('.MB').html(page);
}
//插页
function Chaye(){
    $('.Images1').html('');
    var page = "";
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/c1.jpg" class="PhotoImg1 PhotoImg" onclick="chooseinsets(1,2)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/c2.jpg" class="PhotoImg2 PhotoImg" onclick="chooseinsets(2,2)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/c3.jpg" class="PhotoImg3 PhotoImg" onclick="chooseinsets(3,2)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/c4.jpg" class="PhotoImg3 PhotoImg" onclick="chooseinsets(0,3)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/c5.jpg" class="PhotoImg3 PhotoImg" onclick="chooseinsets(0,4)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m1.jpg" class="MB-img ima_mb" onclick="chooseinsets(1,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m2.jpg" class="MB-img ima_mb" onclick="chooseinsets(2,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m3.jpg" class="MB-img ima_mb" onclick="chooseinsets(3,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m4.jpg" class="MB-img ima_mb" onclick="chooseinsets(4,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m5.jpg" class="MB-img ima_mb" onclick="chooseinsets(5,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m6.jpg" class="MB-img ima_mb" onclick="chooseinsets(6,1)"/>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m7.jpg"class="MB-img ima_mb"onclick="chooseinsets(7,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m8.jpg"class="MB-img ima_mb" onclick="chooseinsets(8,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m9.jpg"class="MB-img ima_mb" onclick="chooseinsets(9,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m10.jpg"class="MB-img ima_mb" onclick="chooseinsets(10,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m11.jpg"class="MB-img ima_mb" onclick="chooseinsets(11,1)>';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m12.jpg"class="MB-img ima_mb" onclick="chooseinsets(12,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m13.jpg"class="MB-img ima_mb" onclick="chooseinsets(13,1)">';
    page+='<img src="'+ROOT+'/Apps/WebApp/View/default/images/photoNewBook/fresh/m14.jpg"class="MB-img ima_mb" onclick="chooseinsets(14,1)">';
    $('.Images1').html(page);
}
$('.more').click(function(){
	$('.ima_mb').css('display','none');
	$('.PhotoImg').css('display','block');
})
$('.more_1').click(function(){
	$('.ima_mb').css('display','block');
	$('.PhotoImg').css('display','none');
})
